package com.xbb.service.impl;

import com.xbb.entity.Student;
import com.xbb.entity.StudentParam;
import com.xbb.mapper.StudentMapper;
import com.xbb.service.IStudentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.validation.Valid;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr xie
 * @since 2020-06-03
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {

    @Autowired
    StudentMapper mapper;
   
    @Override
    public boolean updateBatch(Integer uid, String ids) {
        String[] split = ids.split(",");
        return mapper.updateBatch(uid,split);
    }

    @Override
    public List<StudentParam> getStuList(StudentParam studentParam) {
        return mapper.getStuList(studentParam);
    }

    @Override
    public List<StudentParam> getStuListInZiXunShi(StudentParam studentParam) {
        return mapper.getStuListInZiXunShi(studentParam);
    }

    @Override
    public List<StudentParam> getStuListInWangLuoZiXunShi(StudentParam studentParam) {
        return mapper.getStuListInWangLuoZiXunShi(studentParam);
    }

    @Override
    public boolean ruanShanById(Integer id) {
        return mapper.ruanShanById(id);
    }

    @Override
    public List<Student> getStuName(@Valid Student student) {
        return mapper.getStuName(student);
    }

    @Override
    public List<StudentParam> queryByIds(String ids) {
        String[] split = ids.split(",");
        return mapper.queryByIds(split);
    }
}
